<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" >

<%@ include file="../base/taglibs.jsp" %>
<%@ page session="true"%>

<html>
	<%@ include file="../base/head.jsp" %>

	<body>
		<div id="wrap">
			<%@ include file="../snipped/header.jsp"%>
			
			<div id="content">
				
				<c:if test="${edit}">
				<a href="<c:url value="/band/edit?id=${band.id}" />">Zpět na detail kapely <b><c:out value="${band.name}"/></b></a>
				<br />
				
				<form:form id="form" method="post" modelAttribute="member"  action="memberSave">
					
					<%@ include file="../snipped/msgErr.jsp" %>
					
						<h2>Editace člena</h2>
						
						<fieldset>
							<table>
								<tr>
									<td><form:label path="nick">Nick:</form:label></td>
									<td><form:input path="nick" maxlength="50" size="50" /><small>max. 50 znaků</small></td>
								</tr>
								<tr>
									<td><form:label path="name">Jméno:</form:label></td>
									<td><form:input path="name" maxlength="50" size="50" /></td>
								</tr>
								<tr>
									<td><form:label path="surname">Příjmení:</form:label></td>
									<td><form:input path="surname" maxlength="50" size="50" /></td>
								</tr>
								<tr>					
									<td><form:label path="email">Email:</form:label></td>
									<td><form:input path="email" maxlength="50" size="50" /></td>
								</tr>
								<tr>
									<td><form:label path="phone">Telefon:</form:label></td>
									<td><form:input path="phone" maxlength="20" size="20" /></td>
								</tr>
								<tr>
									<td nowrap="nowrap"><form:label path="dateOfBirth">Datum narození:</form:label></td>
									<td><form:input path="dateOfBirth" /><small>vzor: RRRR-MM-DD</small></td>
								</tr>
								<tr>
									<td><form:label path="job">Funkce v kapele:</form:label></td>
									<td><form:textarea path="job" cols="85" rows="3" /><br /><small>max. 200 znaků</small></td>
								</tr>
							</table>
						</fieldset>
						
						<p><button type="submit">Uložit</button><form:input path="id" cssStyle="visibility:hidden;" /></p>
						
					</form:form>
				
				</c:if>
				
				<c:if test="${not edit}">
				
				<h2>Detail člena</h2>
				
				<a href="<c:url value="/band/browse?id=${band.id}" />">Zpět na detail kapely <b><c:out value="${band.name}"/></b></a>
				<br />
				
				<table>
					<tr>
						<th>Nick:</th>
						<td><c:out value="${member.nick}"/></td>
					</tr>
					<tr>
						<th>Jméno:</th>
						<td><c:out value="${member.name}"/></td>
					</tr>
					<tr>
						<th>Příjmení:</th>
						<td><c:out value="${member.surname}"/></td>
					</tr>
					<tr>					
						<th>Email:</th>
						<td><c:out value="${member.email}"/></td>
					</tr>
					<tr>
						<th>Telefon:</th>
						<td><c:out value="${member.phone}"/></td>
					</tr>
					<tr>
						<th nowrap="nowrap">Datum narození:</th>
						<td><c:out value="${member.dateOfBirth}"/></td>
					</tr>
					<tr>
						<th>Funkce v kapele:</th>
						<td><c:out value="${member.job}"/></td>
					</tr>
				</table>
				
				</c:if>
				
			</div>
			
			<br />
			<%@ include file="../snipped/footer.jsp"%>
		</div>
	</body>
	
</html>